#pragma once

#include "AbstractTensorProductSurfaces.h"

namespace cagd
{
    class BicubicUniformPeriodicBSplinePatch: public AbstractTensorProductSurface
    {
    public:
        BicubicUniformPeriodicBSplinePatch(
                GLdouble u_min = 0.0, GLdouble u_max = 1.0,
                GLdouble v_min = 0.0, GLdouble v_max = 1.0,
                GLuint row_count = 4, GLuint column_count = 4, GLboolean is_closed = false);

        GLboolean UBlendingFunctionValues(GLdouble u_knot, RowMatrix<GLdouble> &blending_values) const;
        GLboolean VBlendingFunctionValues(GLdouble v_knot, RowMatrix<GLdouble> &blending_values) const;
        GLboolean CalculateAllInformation(GLdouble u, GLdouble v, SurfaceInformation &pd) const;

        ~BicubicUniformPeriodicBSplinePatch();
    };
}
